import Path from 'path';
import { fileURLToPath } from 'url';
import { isExist, isDirectory, getAllFiles, mkdir, touch, writeFile, readFile,copy,remove } from "../fs.js";
// import { getmd5 } from '../id.js';

const __dirname = Path.dirname(fileURLToPath(import.meta.url));

(async () => {
    // console.log(await isExist(Path.resolve(__dirname, './fs.js')));
    // console.log(await isExist(Path.resolve(__dirname, './fs.no.js')));

    // console.log(await isDirectory(__dirname));
    // console.log(await isDirectory(Path.resolve(__dirname, './no')));

    // console.log(await getAllFiles(Path.resolve(__dirname, './../node_modules')));
    // console.log(await getmd5('xxxx'));

    // console.log(Path.resolve('/te','./../../'))
    // const target = Path.resolve(__dirname, './sdsd/sdsdwe/wew3/2323/mm.js');
    // await touch(target);
    // await writeFile(target, '{"aa":"aa"}');
    // console.log((await readFile(target)).toString());

    // await copy(__dirname,Path.resolve(__dirname,'./../test2'))
    // await remove(Path.resolve(__dirname,'./../test2'));
})();